home *** CD-ROM | disk | FTP | other *** search
- DEFINT A-Z
- SCREEN 13
- YPOS = 2
- FOR x = 0 TO 255 STEP 16
- LINE (x + 4, YPOS * 8)-(x + 4, 5 * 8)
- LOCATE YPOS, x / 8 + 1
- IF YPOS = 4 THEN YPOS = 2 ELSE YPOS = YPOS + 1
- PRINT LTRIM$(STR$(x));
- FOR y = 40 TO 190 STEP 10
- LINE (x, y)-(x + 16, y + 16), a, BF
- a = a + 1
- NEXT y
- NEXT x
-
- DIM pal(255) AS LONG
- DEF FNPAL& (r, g, b) = 65536 * b + 256 * g + r
- 'color number = 65536 * blue + 256 * green + red
-
- curve = 2
- FOR x = 0 TO 7
- prop = x * 7 + 14
- curve = curve * 1.525
- FOR binary.flags = 1 TO 7
- red = 0: green = 0: blue = 0
- IF binary.flags AND 4 THEN red = 1
- IF binary.flags AND 2 THEN green = 1
- IF binary.flags AND 1 THEN blue = 1
- attribute = ((binary.flags + 1) * 8) + x
- colour& = FNPAL&(red * prop, green * prop, blue * prop)
- pal(attribute) = colour&
- PALETTE attribute, colour&
- attribute = attribute + 56
- colour& = FNPAL&(red * curve, green * curve, blue * curve)
- pal(attribute) = colour&
- PALETTE attribute, colour&
- NEXT binary.flags
- NEXT x
-
- WHILE INKEY$ = "": WEND
-
- LOCATE 25, 1
- PRINT "Write output file?";
- WHILE i$ = ""
- i$ = INKEY$
- WEND
- IF UCASE$(i$) = "Y" THEN
- OPEN "PALETTE" FOR OUTPUT AS #1
- FOR x = 0 TO 255
- IF pal(x) <> 0 THEN PRINT #1, x, pal(x)
- NEXT x
- END IF
-
- END
-
-